import request from '@/utils/request'
// 获取组织架构
export const reqGetDepartments = () => request({
  method: 'get',
  url: '/company/department'
})

// 删除部门
export const reqDelDEpartment = id => request({
  method: 'delete',
  url: `/company/department/${id}`
})

// 新增部门
export const reqAddDept = data => request({
  method: 'post',
  url: '/company/department',
  data
})

// 根据id查询部门详情
export const reqGetDeptInfoById = id => request({
  method: 'get',
  url: `/company/department/${id}`
})

// 更新部门详情
// post patch put  --- data   get delete  --params
export const reqUpdateDeptInfo = data => request({
  method: 'put',
  url: `/company/department/${data.id}`,
  data
})
